package com.zuihai.app.di.module;

import com.jess.arms.di.scope.FragmentScope;
import com.zuihai.app.mvp.contract.SearchRecyclerContract;
import com.zuihai.app.mvp.model.SearchRecyclerModel;

import dagger.Module;
import dagger.Provides;

/**
 * Created by Administrator on 2017/5/6 0006.
 */

@Module
public class SearchRecyclerModule {
    private SearchRecyclerContract.View view;

    /**
     * 构建SearchRecyclerModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public SearchRecyclerModule(SearchRecyclerContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    SearchRecyclerContract.View provideSearchRecyclerView() {
        return this.view;
    }

    @FragmentScope
    @Provides
    SearchRecyclerContract.Model provideSearchRecyclerModel(SearchRecyclerModel model) {
        return model;
    }
}